package com.nfc.lock.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.nfc.lock.dto.request.LockOperateRequest;
import com.nfc.lock.dto.response.LockListVO;
import com.nfc.lock.entity.NfcLock;

/**
 * 锁具Service接口
 */
public interface INfcLockService extends IService<NfcLock> {

    /**
     * 新增锁具
     */
    void addLock(String lockNfcId, Long roomId);

    /**
     * 开锁操作
     */
    void openLock(LockOperateRequest request);

    /**
     * 关锁操作
     */
    void closeLock(LockOperateRequest request);

    /**
     * 分页查询锁具列表
     */
    IPage<LockListVO> getLockList(Integer pageNum, Integer pageSize, String lockNfcId,
                                  Long roomId, Long regionId, Integer lockStatus);

    /**
     * 获取锁具详情
     */
    LockListVO getLockDetail(Long lockId);

    /**
     * 报告锁具损坏
     */
    void reportDamage(Long lockId, String remark);

    /**
     * 删除锁具
     */
    void deleteLock(Long lockId);
}
